Add TAL-Reverb-II plugin to test
[juce-lv2.git] / juce / source / extras / Introjucer / Source / Code Editor / jucer_SourceCodeEditor.cpp
blob93e5371f6f07697e755d2d340b7a0a113dba3588
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-10 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #include "jucer_SourceCodeEditor.h"
27 #include "../Application/jucer_OpenDocumentManager.h"
30 //==============================================================================
31 SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document_,
32 CodeDocument& codeDocument,
33 CodeTokeniser* const codeTokeniser)
34 : DocumentEditorComponent (document_),
35 editor (codeDocument, codeTokeniser)
37 addAndMakeVisible (&editor);
39 #if JUCE_MAC
40 Font font (10.6f);
41 font.setTypefaceName ("Menlo Regular");
42 #else
43 Font font (10.0f);
44 font.setTypefaceName (Font::getDefaultMonospacedFontName());
45 #endif
46 editor.setFont (font);
49 SourceCodeEditor::~SourceCodeEditor()
53 void SourceCodeEditor::resized()
55 editor.setBounds (0, 0, getWidth(), getHeight());
58 bool SourceCodeEditor::isTextFile (const File& file)
60 return file.hasFileExtension ("cpp;h;hpp;mm;m;c;cc;cxx;txt;xml;plist;rtf;html;htm;php;py;rb;cs");
63 bool SourceCodeEditor::isCppFile (const File& file)
65 return file.hasFileExtension (sourceOrHeaderFileExtensions);